<style tyle="text/css">
    .modal-lg {
      width: 70%;
    }
    .right{
        float: right;
    }
  .font-color {
    color: #428bca;
  }

  </style>
  <div class="modal-header">
    <h4 class="modal-title">选择分销商
           
    </h4>
    <h5><span class="right" style="height:auto"><label ng-click="allChecked()">
            <i class="fa fa-check-square chechbox-style font-color" ng-show="check"/>
            <i class="fa fa-square-o chechbox-style font-color" ng-show="!check"/> 
            <span style="vertical-align: text-bottom">全选</span>
    </label></span></h5>
  </div>
  <br/>
  
  <div class="modal-body">
        
    <form name="form" class="form-horizontal form-validation ng-pristine ng-valid ng-valid-required">

            <div ng-repeat="group in groupList">
                    <div class="panel panel-default">
                        
                        <div class="panel-heading col-xs-12" style="padding-top: 1px; padding-bottom: 0px;">
                            <div class="col-xs-1" ng-show="!group.is_edit" style="padding: 0px;" ng-click="open_toggle($index)" >
                                <h5>
                                    <span ng-show="!group.is_open" class="glyphicon glyphicon-plus"></span>
                                    <span ng-show="group.is_open" class="glyphicon glyphicon-minus"></span>
                                    <span>{{group.name}}</span>
                                </h5>
                                
                            </div>
                            <h5>
                                <!-- <span class="right" style="height:auto"><input type="checkbox" ng-checked="all" ng-model="groupall"> &nbsp;组内全选</span> -->
                                <span class="right" style="height:auto"><label ng-click="groupChecked($index)">
                                        <i class="fa fa-check-square chechbox-style font-color" ng-show="group.check"/>
                                        <i class="fa fa-square-o chechbox-style font-color" ng-show="!group.check"/> 
                                        <span style="vertical-align: text-bottom">组内全选</span>
                                </label></span>
                            </h5>
                        </div>
                        <table class="table table-bordered panel-body" ng-show="group.is_open">
                            <thead>
                                <tr>
                                    <th class="text-center col-xs-2">分销商名称(编号)</th>
                                   
                                   
                                </tr>
                            </thead>
                            <tbody>
                                <tr >
                                    <!-- <td>
                                        {{obj.name}}({{obj.code}})
                                        <span class="right">
                                            <i class="fa fa-check-square chechbox-style font-color"/>
                                            <i class="fa fa-square-o chechbox-style font-color"/> 
                                            <input type="checkbox" name="company" value="{{obj}}" ng-model="{{obj.code}}" ng-checked="groupall"></span>
                                    </td> -->
                                    <td>
                                        <div ng-repeat="obj in group.childList" style="width:50%; float: left;">
                                                <label ng-click="obj.check = !obj.check">
                                                        <i class="fa fa-check-square chechbox-style font-color" ng-show="obj.check"/>
                                                        <i class="fa fa-square-o chechbox-style font-color" ng-show="!obj.check"/> 
                                                        <span style="vertical-align: text-bottom">{{obj.name}}({{obj.code}})</span>
                                                </label>
                                        </div>
                                       
                                    </td>
                                </tr>
                                <tr ng-show="!group.childList || group.childList.length < 1">
                                    <td colspan="5" class="text-center">
                                        没有数据
                                    </td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                    <br ng-if="!group.is_open">
                    <br ng-if="!group.is_open">
                </div>
      
       
 
    </form>
  
  </div>
  
  <div class="modal-footer" ng-if="!opeinfo.examinestate  && !opeinfo.hisstate" >
      <button class="btn btn-success" type="button"  ng-if="!opeinfo.openstate" ng-click="save()">确定</button>
      <button class="btn btn-danger" type="button" ng-click="cancel()">取消</button>
  </div>
